'use strict';

function amount_even(collection) {
  let sum=0;
  for(let item of collection){
    if(item%2==0){
      sum+=item;
    }
  }
  console.log(sum);
  return sum;
}

module.exports = amount_even;
amount_even([1,2,3,4,5,6,7,8,9,10]);
